/**
 * @(#)ApkSimulatorDAOImpl.java 2016年11月10日
 * Copyright(C) 2016 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IApkSimulatorDAO;
import org.jsbd.boss.domian.channel.ApkRetentConfig;
import org.jsbd.boss.domian.channel.ApkSimulator;
import org.jsbd.boss.domian.channel.ChannelApkConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * apk和模拟器对应关系
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
@Service
public class ApkSimulatorDAOImpl extends CrackBaseDao implements IApkSimulatorDAO {
	public static final Logger LOGGER = LoggerFactory.getLogger(ApkSimulatorDAOImpl.class);

	@Override
	public List<ApkSimulator> getApkSimulators(ApkSimulator apkSimulator) {
		return super.queryForList("qy_apk_simulator.GET_APK_SIMULATOR", apkSimulator);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.jsbd.boss.dao.IApkSimulatorDAO#getApkInfoList(java.lang.String,
	 * java.lang.String)
	 */
	@Override
	public List<ChannelApkConfig> getApkInfoList(String sysVer) {
		ApkSimulator apkSimulator = new ApkSimulator();
		apkSimulator.setSysVer(sysVer);
		return super.queryForList("qy_apk_simulator.GET_APK_SIMULATORS", apkSimulator);
	}

	@Override
	public List<ApkSimulator> getVerList(String mark) {
		ApkSimulator apkSimulator = new ApkSimulator();
		apkSimulator.setMark(mark);
		return super.queryForList("qy_apk_simulator.GET_VERS", apkSimulator);
	}

	
	/**
	 * 
	 * selectAllRetentAPkList:查询所有需要做留存任务的apk信息
	 * 
	 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
	 * @param sysVer
	 * @param taskVer
	 * @return
	 */
	@Override
	public List<ApkRetentConfig> selectAllRetentAPkList(ApkSimulator apkSimulator) {
		return super.queryForList("qy_apk_simulator.SELECT_ALL_RETENT_APK_INFO", apkSimulator);
	}

	@Override
	public void insertApkSimulator(List<ApkSimulator> apkList) {
		super.batchInsert("qy_apk_simulator.INSERT_APK_SIMULATOR", apkList);
	}

	@Override
	public int delApkSimulator(ApkSimulator apkSimulator) {
		return super.delete("qy_apk_simulator.DEL_APK_SIMULATOR", apkSimulator);
	}
}
